package com.lanou3g.dllo.baidumusic.musiclibrary.radio;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.lanou3g.dllo.baidumusic.R;

/**
 * Created by dllo on 16/6/25.
 */
public class RadioDetailActivity extends AppCompatActivity {

    private TabLayout radioDetailTabLayout;
    private ViewPager radioDetailViewPager;
    private RadioDetailActivityAdapter radioDetailActivityAdapter;
    private ImageView radioDetailDeleteIv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_radiodetail);

        radioDetailTabLayout = (TabLayout) findViewById(R.id.radiodetail_tablayout);
        radioDetailViewPager = (ViewPager) findViewById(R.id.radiodetail_viewpager);
        radioDetailActivityAdapter = new RadioDetailActivityAdapter(getSupportFragmentManager());
        radioDetailViewPager.setAdapter(radioDetailActivityAdapter);
        radioDetailTabLayout.setupWithViewPager(radioDetailViewPager);
        radioDetailTabLayout.setSelectedTabIndicatorHeight(0);
        radioDetailTabLayout.setTabTextColors(Color.GRAY, Color.WHITE);
        // 设置TabLayout可滑动
        radioDetailTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);

        radioDetailDeleteIv = (ImageView) findViewById(R.id.radiodetail_delete_iv);
        radioDetailDeleteIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
